#include<stdio.h>

int x,y;
int c(x, y)
{
    int number=0;
    if((x==1)||(y==x+1))
    {return(1);}

    else{
        number=c(x-1,y-1)+c(x-1,y);
        return(number);
    }
}
int main()
{
    int i,j,n=13;
    printf("N=");
    while(n>12)
    scanf("%d",&n);
    for(i=0;i<=n;i++)
    {
        for(j=0;j<12-i;j++) printf(" ");
            for(j=1;j<i+2;j++) printf("%d ",c(i,j));
            printf("\n");
    }

    return 0;
}